package cn.gov.escience.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import cn.gov.escience.model.User;

public interface UserRepository extends JpaRepository<User, Integer> {
	// 命名规则访问http://docs.spring.io/spring-data/jpa/docs/1.9.4.RELEASE/reference/html/
	List<User> findByUsernameContaining(String name);

	@Query("select u from User u where password like %?1%")
	List<User> findByPassword(String password);

}
